package com.ss.test11;

/**
 * @Auther: 520ljs
 * @Date: 2022/3/20 - 03 - 20 - 15:17
 */
public class CustomerThread extends Thread{//消费线程
    //共享商品：
    private Product p;

    public CustomerThread(Product p){
        this.p = p;
    }

    @Override
    public void run() {
        for(int i = 1;i <= 10; i++){//i:消费次数
            p.getProduct();
        }
    }
}
